# PLEASE READ THE MAN PAGE BEFORE EDITING THIS FILE!
# https://htmlpreview.github.io/?https://github.com/conformal/spectrwm/blob/master/spectrwm.html
# NOTE: all rgb color values in this file are in hex! see XQueryColor for examples

workspace_limit	= 9
focus_mode		= default
focus_close		= previous
focus_close_wrap	= 1
focus_default		= last
spawn_position		= first
workspace_clamp	= 0
warp_focus		= 0
warp_pointer		= 0

# Window Decoration
border_width		= 2
color_focus		= rgb:9e/ee/ee
# color_focus_maximized	= yellow
# color_unfocus		= rgb:88/88/88
# color_unfocus_maximized	= rgb:88/88/00
# region_padding	= 0
# tile_gap		= 0

# Region containment
# Distance window must be dragged/resized beyond the region edge before it is
# allowed outside the region.
# boundary_width 		= 50

# Remove window border when bar is disabled and there is only one window in workspace
disable_border		= always

# Bar Settings
bar_enabled		= 1
bar_border_width	= 0
bar_action_expand = 0
urgent_enabled		= 1
# urgent_collapse = 1
# bar_border[1]		= rgb:00/80/80
# bar_border_unfocus[1]	= rgb:00/40/40
bar_color[0]		= rgb:ff/ff/ea, rgb:9e/ee/ee
# bar_color_selected[1]	= rgb:00/80/80
bar_font_color[1]	= black
# bar_font_color_selected	= black
bar_font		= Misc Fixed:pixelsize=12
bar_action		= baraction.sh
bar_justify		= right
bar_format		= +|L+L +S +@bg=1;+W+|R+A
#bar_format	        	= +|L+U+1<+N:+I +S (+D) +W +|R+A+1<+@fg=5; %a %b %d [%R]
workspace_indicator	= listcurrent,listactive,markcurrent,markurgent,listurgent
# bar_at_bottom		= 1
# stack_enabled		= 1
clock_enabled		= 0
# clock_format		= %a %b %d %R %Z %Y
# iconic_enabled	= 0
# maximize_hide_bar	= 0
# window_class_enabled	= 0
# window_instance_enabled	= 0
# window_name_enabled	= 0
# verbose_layout		= 1

# Launch applications in a workspace of choice
# autorun		= ws[1]:xterm
# autorun		= ws[2]:xombrero http://www.openbsd.org

# Customize workspace layout at start
# layout		= ws[1]:4:0:0:0:vertical
# layout		= ws[2]:0:0:0:0:horizontal
#layout		= ws[5]:0:0:0:0:fullscreen
# layout		= ws[4]:4:0:0:0:vertical_flip
# layout		= ws[5]:0:0:0:0:horizontal_flip

# Set workspace name at start
# name			= ws[1]:IRC
# name			= ws[2]:Email
# name			= ws[3]:Browse
#name			= ws[5]:acme
# name			= ws[10]:Music

# Mod key, (Windows key is Mod4) (Apple key on OSX is Mod2)
modkey = Mod4

# This allows you to include pre-defined key bindings for your keyboard layout.
# keyboard_mapping = ~/.spectrwm_us.conf

# PROGRAMS

# Validated default programs:
program[lock]		= sxlock
program[term]		= alacritty
program[menu]		= dmenu_run $dmenu_bottom -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected
# program[search]	= dmenu $dmenu_bottom -i -fn "$bar_font" -nb $bar_color -nf $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected
# program[name_workspace]	= dmenu $dmenu_bottom -p Workspace -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected

program[plumb]		= sh -c 'plumb $(xsel -p)'
bind[plumb]			= F13

program[plumb-ff]	=	sh -c 'firefox $(xsel -p)'
bind[plumb-ff]		=	MOD+F13

program[window]		= dswitcher
bind[window]		= MOD + Tab

program[scratch]    = scratchterm 1
bind[scratch]       = MOD + grave

program[mpctoggle]	= mocp -M ~/.config/moc  -G
program[mpcnext]	= mocp -M ~/.config/moc  -f
program[mpcprev]	= mocp -M ~/.config/moc  -r
bind[mpcprev]		=	MOD+Left
bind[mpctoggle]		=	MOD+Down
bind[mpcnext]		=	MOD+Right

program[backlightup]	= xbacklight -inc 5
program[backlightdown]	= xbacklight -dec 5
bind[backlightup]		= XF86MonBrightnessUp
bind[backlightdown]		= XF86MonBrightnessDown

program[dsurfraw]	= dsurfraw
bind[dsurfraw]		= MOD+s

program[passmenu]	= passmenu
bind[passmenu]		=	MOD+d

program[arandr]		=	arandr
bind[arandr]		=	MOD+F7

#program[newz]		= danewz
#bind[newz]			= MOD+n

program[null]		= echo nil
bind[null]			= Control+Shift+w

program[screenshot-sel]	= screenshot -s
bind[screenshot-sel]	= Shift+Print

program[screenshot-sel-u]	= screenshot -s -u
bind[screenshot-sel-u]	= Control+Shift+Print

program[sound_mute] = amixer set Master toggle
bind[sound_mute] = XF86AudioMute

program[raise_volume] = amixer -q set Master 5%+ unmute
bind[raise_volume]    = XF86AudioRaiseVolume

program[lower_volume] = amixer -q set Master 5%- unmute
bind[lower_volume]    = XF86AudioLowerVolume

# QUIRKS
# Default quirks, remove with: quirk[class:name] = NONE
quirk[MPlayer:xv]			= FLOAT + FULLSCREEN + FOCUSPREV
# quirk[OpenOffice.org 2.4:VCLSalFrame]	= FLOAT
# quirk[OpenOffice.org 3.0:VCLSalFrame]	= FLOAT
# quirk[OpenOffice.org 3.1:VCLSalFrame]	= FLOAT
quirk[Firefox-bin:firefox-bin]		= TRANSSZ
quirk[Firefox:Dialog]			= FLOAT
#quirk[Gimp:gimp]			= FLOAT + ANYWHERE
quirk[workrave:.*]			= FLOAT + ANYWHERE + IGNORESPAWNWS
quirk[.*exe:.*]			= FLOAT + ANYWHERE + IGNORESPAWNWS + WS[8]
# quirk[XTerm:xterm]			= XTERM_FONTADJ
# quirk[xine:Xine Window]			= FLOAT + ANYWHERE
# quirk[Xitk:Xitk Combo]			= FLOAT + ANYWHERE
# quirk[xine:xine Panel]			= FLOAT + ANYWHERE
# quirk[Xitk:Xine Window]			= FLOAT + ANYWHERE
# quirk[xine:xine Video Fullscreen Window] = FULLSCREEN + FLOAT
# quirk[pcb:pcb]				= FLOAT
quirk[Tor Browser:.*]		= FLOAT
quirk[scratchterm:.*]       = FLOAT+IGNORESPAWNWS
quirk[qutebrowser:.*]               = WS[1]
quirk[firefox:.*]                   = WS[1]
quirk[Navigator:.*]                 = WS[1]
quirk[Pale moon:.*]                 = WS[1]
quirk[Pale moon:Pale Moon Preferences] = WS[1] + FLOAT

quirk[mpv:.*]	= WS[4]
quirk[acme:.*]	= WS[5]
quirk[FLTK:FLTK:pinentry-fltk]	= FLOAT + ANYWHERE
quirk[stalonetray:stalonetray]			= FLOAT + ANYWHERE + NOFOCUSCYCLE + NOFOCUSONMAP + OBEYAPPFOCUSREQ
quirk[trayer:panel]			= FLOAT + ANYWHERE + NOFOCUSCYCLE + NOFOCUSONMAP + OBEYAPPFOCUSREQ + FULLSCREEN
quirk[Polybar:.*] = FLOAT + ANYWHERE + MINIMALBORDER + NOFOCUSCYCLE + NOFOCUSONMAP